import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import axios from 'axios'
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/global.css'
import '@/assets/fonts/iconfont.css'
Vue.use(ElementUI);
// 配置全局api请求根域名
axios.defaults.baseURL = "http://127.0.0.1:8888/api/private/v1/"
axios.interceptors.request.use(config => {
  // config 可以看做是请求的配置项
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 记得处理完 要return config
  return config
})



Vue.prototype.$http = axios

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
